import {task, progress, group, user, document, page, groupMember, answer, comment} from '../fragment'

export const userProgresses = `query ($pageIndex: Int, $pageSize: Int) {
  userProgresses (pageIndex: $pageIndex, pageSize: $pageSize) {
    ${page}
    rows {
      ${progress}
      task {
        ${task}
        group {
          ${group}
        }
      }
      document {
        ${document}
        user {
          ${user}
        }
      }
    }
  }
}`

export const progressGetById = `query (
  $progressId: ID!
) {
  progress (id: $progressId) {
    ${progress}
    document {
      ${document}
      user {
        ${user}
      }
    }
    task {
      ${task}
    }
    user {
      ${user}
    }
    member {
      ${groupMember}
    }
    answers {
      ${answer}
      comments {
        ${comment}
      }
      user {
        ${user}
      }
    }
  }
}`
